<template>
  <el-form ref="form" :model="form" label-width="80px">
    <el-form-item label="病人姓名">{{orinfo.patientname}}
    </el-form-item>
    <el-form-item label="病人年龄">{{orinfo.birthday}}
    </el-form-item>
    <el-form-item label="病症描述">{{orinfo.symptom}}
    </el-form-item>
    <el-form-item label="病人姓名">{{orinfo.patientname}}
    </el-form-item>
    <el-form-item label="回复">
    </el-form-item>
  </el-form>
</template>

<script>
    export default {
      name: "detail",
      data() {
          return{
            orinfo: [],
            form: {
              name: '',
              region: '',
              date1: '',
              date2: '',
              delivery: false,
              type: [],
              resource: '',
              desc: ''
            }
          }
      },
      methods: {
        getList: function () {
          var user = localStorage.getItem('User')
          var id = localStorage.getItem('id')
          console.log(user)
          this.$ajax.get('http://47.75.110.31:8080/orinfo/findByIdAndDoctor?id='+id+'&doctor=' + user)
            .then(response => {
              this.orinfo = response.data;
              console.log(this.orinfo[0].id)
            })
        },
      },
      mounted() {
        this.getList()
      }
    }
    //   this.$ajax.post('http://47.75.110.31:8080/orinfo/updatere?id='+orderId+'&diagnosis='+value,
    //     {
    //
    //       headers: {
    //         'Content-Type': 'application/json;charset=UTF-8'
    //       }
    //     }
    //   ).then(response => {
    //     console.log(response.data);
    //     if (response.data == "success") {
    //       this.$message({
    //         message: '恭喜你添加成功',
    //         type: 'success'
    //       });
    //     }
    //   })
    //   location.reload()
    // }
</script>

<style scoped>

</style>
